boot-qemu.sh: Support booting ARMv7 kernels under KVM on AArch64 hosts#52
Merged
nathanchance merged 1 commit intoJan 13, 2022
Merged
Conversation
c74e7c7 to
a40243b
Compare
Member
|
Marc Zyngier took a look and said this LGTM, though the host will be told the guest is ARMv8, so the commit message may want to s/ARMv7/32b ARM/. |
nickdesaulniers
approved these changes
Jan 13, 2022
Member
Author
I thought about saying 32-bit ARM in the commit message but I don't think we can do this scheme for |
It is possible to use KVM on AArch64 hosts to boot ARMv7 kernels, which
can result in a significant amount of speed up. On a Raspberry Pi 4:
Benchmark 1: boot-qemu.sh
Time (mean ± σ): 3.879 s ± 0.041 s [User: 1.389 s, System: 0.405 s]
Range (min … max): 3.839 s … 3.982 s 20 runs
Benchmark 2: boot-qemu.sh --no-kvm
Time (mean ± σ): 17.997 s ± 0.091 s [User: 15.614 s, System: 0.422 s]
Range (min … max): 17.850 s … 18.200 s 20 runs
Summary
'boot-qemu.sh' ran
4.64 ± 0.05 times faster than 'boot-qemu.sh --no-kvm'
However, the host must support 32-bit EL1, which is not always true so
we need to add a small C program to check for it before using
'aarch64=off' + '-enable-kvm'. This has no detectable overhead on a
system that does not support it.
Benchmark 1: boot-qemu.sh (with check)
Time (mean ± σ): 6.148 s ± 0.027 s [User: 3.944 s, System: 0.219 s]
Range (min … max): 6.098 s … 6.193 s 20 runs
Benchmark 2: boot-qemu.sh (without check)
Time (mean ± σ): 6.137 s ± 0.029 s [User: 3.981 s, System: 0.170 s]
Range (min … max): 6.079 s … 6.208 s 20 runs
Summary
'boot-utils-ro' ran
1.00 ± 0.01 times faster than 'boot-utils'
Link: https://fedoraproject.org/wiki/Architectures/AArch64/Booting_a_32-Bit_QEMU_image
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
a40243b to
ad66a0d
Compare
Member
Author
|
Okay, I see the part that was a little confusing. I adjusted the commit message ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It is possible to use KVM on AArch64 hosts to boot ARMv7 guests, which
can result in a significant amount of speed up. On a Raspberry Pi 4:
However, the host must support 32-bit EL1, which is not always true so we need
to add a small C program to check for it before using 'aarch64=off' +
'-enable-kvm'. This has no detectable overhead on a system that does not
support it.
Link: https://fedoraproject.org/wiki/Architectures/AArch64/Booting_a_32-Bit_QEMU_image